<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String uname = "";
String upwd = "";
request.setCharacterEncoding("utf-8");
uname = request.getParameter("uname");
upwd = request.getParameter("upwd");
//如果用户和密码都等于admin
if("admin".equals(uname)&&"admin".equals(upwd)){

   session.setAttribute("uname", uname);
   request.getRequestDispatcher("suceess.jsp").forward(request, response);
}
else{
   response.sendRedirect("index.jsp");

}




%>


